|
![](/i/fill.gif) |
In article <382E63E2.44D8BD9E@geocities.com> , "Jon A. Cruz"
<jon### [at] geocities com> wrote:
> NO NONO NONONONONONONNO!!!!!!!!
> aaaaaaaaaaaaaahhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!
>
> (sorry, but I sometimes panic at potentially dangerous code) :-)
Yes!!!!!!!
> Wouldn't it be safer to change it to something like
>
> [taking a wild guess without having the mac sources around]
>
> char povVers[ sizeof(POV_RAY_VERSION) + 1 ];
> or
> char *povVers = (char *)malloc( sizeof(POV_RAY_VERSION) + 1 );
Yes, that would have been better a long time ago, but keep two things in
mind:
First, that usually this string is a version number which shouldn't be that
long after all, i.e. "3.1g.r1" is only 10 bytes so 16 is safe for all
official cases.
Second, the Mac 3.1 code will be replaced completely with 3.5, so it makes
no sense to fix something that will never be used again, nor to invest even
a few seconds into it if those can be spend better on 3.5 :-)
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |